import { Entity, PrimaryGeneratedColumn, Column, OneToMany } from 'typeorm';
import { CueParamItem } from './cue_param_item.entity';

@Entity('tb_cue_param')
export class CueParam {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ length: 255, comment: '参数组字段英文名称', name: 'param_name' })
  paramName: string;

  @Column({ length: 255, comment: '参数组字段中文名称', name: 'param_label' })
  paramLabel: string;

  @Column({
    type: 'tinyint',
    default: 1,
    comment: '参数类型：1-通用参数，2-个性化参数',
    name: 'param_type'
  })
  paramType: number;

  @OneToMany(() => CueParamItem, item => item.param)
  items: CueParamItem[];
}
